import Vue from 'vue'
const SUCCESS = 1000000
const API_ROOT = server.root + '/newmanage'

const usersInvitationListResource = Vue.resource(API_ROOT + '/share/list')

export const usersInvitationList = ({dispatch}, params) => {
  return usersInvitationListResource.get(params)
    .then((res) => {
      if (+res.data.code === SUCCESS) {
        return Promise.resolve(res.data.data.list)
      }
      return Promise.reject(res.data)
    })
}
